//
//  LiveCommunicationCenter.m
//  控制器解耦测试
//
//  Created by tianlong on 2018/11/9.
//  Copyright © 2018年 tianlong. All rights reserved.
//

#import "LiveCommunicationCenter.h"

@implementation LiveCommunicationCenter
- (void)forwardInvocation:(NSInvocation *)anInvocation {
    SEL selector = anInvocation.selector;
    [self.liveVC.businessSource enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
        if ([obj respondsToSelector:selector]) {
            [anInvocation invokeWithTarget:obj];
        }
    }];
}
@end

/*
 NSLog(@"\n----------- \n%s\nobjClass = %@,\nselector = %@ \n-----------",__func__,NSStringFromClass([obj class]),NSStringFromSelector(selector));
 */
